package com.junjie.springcloud.service;

import com.junjie.springcloud.entities.CommonResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * @Author Yi Jun jie
 * @Date 2021/3/1 13:58
 * 这里已经自动使用轮询负载均衡的功能了
 * 如果两个PaymentMain9003/9004服务都宕机的话就会调用这个兜底的方法
 */
@FeignClient(value = "nacos-payment-provider", fallback = PaymentFallbackService.class)
public interface PaymentService {

    @GetMapping("/payment/get/{id}")
    public CommonResult paymentSql(@PathVariable("id")Long id);
}
